package com.googlecode.jsitemap;

import java.io.IOException;
import java.io.OutputStream;
import java.util.Collection;

/**
 * @author Denis Migol
 * 
 */
public interface Builder<E extends EntryBase<?>, P extends BuildParamsBase<?>> {
	/**
	 * Provided file must have no more than 50,000 URLs
	 */
	int MAX_URLS = 50000;

	/**
	 * Provided file must be no larger than 10MB (10,485,760 bytes)
	 */
	int MAX_SIZE = 10485760;

	/**
	 * 
	 * @param out
	 * @param entries
	 * @return number of included entries
	 * @throws IOException
	 */
	int build(OutputStream out, Collection<E> entries) throws IOException;
}
